package com.itasura.facade;

/**
 * @author sailor wang
 * @date 2018/11/24 4:04 PM
 * @description
 */
public class EquipmentFacade implements Facade {
    private AirConditioner airConditioner;
    private Light light;
    private TV tv;


    public EquipmentFacade(AirConditioner airConditioner, Light light, TV tv) {
        this.airConditioner = airConditioner;
        this.light = light;
        this.tv = tv;
    }

    @Override
    public void on() {
        light.on();
        tv.on();
        airConditioner.on();
    }

    @Override
    public void off() {
        light.off();
        tv.off();
        airConditioner.off();
    }
}